package xin.clips.system.service.impl;

import java.util.List;
import xin.clips.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xin.clips.common.core.text.Convert;
import xin.clips.system.domain.gy.GyArmParamRecord;
import xin.clips.system.mapper.gy.GyArmParamRecordMapper;
import xin.clips.system.service.gy.IGyArmParamRecordService;

/**
 * 机械臂配置Service业务层处理
 *
 * @author clips
 * @date 2023-03-15
 */
@Service
public class GyArmParamRecordServiceImpl implements IGyArmParamRecordService
{
    @Autowired
    private GyArmParamRecordMapper gyArmParamRecordMapper;

    /**
     * 查询机械臂配置
     *
     * @param recordId 机械臂配置主键
     * @return 机械臂配置
     */
    @Override
    public GyArmParamRecord selectGyArmParamRecordByRecordId(Long recordId)
    {
        return gyArmParamRecordMapper.selectGyArmParamRecordByRecordId(recordId);
    }

    /**
     * 查询机械臂配置列表
     *
     * @param gyArmParamRecord 机械臂配置
     * @return 机械臂配置
     */
    @Override
    public List<GyArmParamRecord> selectGyArmParamRecordList(GyArmParamRecord gyArmParamRecord)
    {
        return gyArmParamRecordMapper.selectGyArmParamRecordList(gyArmParamRecord);
    }

    /**
     * 新增机械臂配置
     *
     * @param gyArmParamRecord 机械臂配置
     * @return 结果
     */
    @Override
    public int insertGyArmParamRecord(GyArmParamRecord gyArmParamRecord)
    {
        gyArmParamRecord.setCreateTime(DateUtils.getNowDate());
        return gyArmParamRecordMapper.insertGyArmParamRecord(gyArmParamRecord);
    }

    /**
     * 修改机械臂配置
     *
     * @param gyArmParamRecord 机械臂配置
     * @return 结果
     */
    @Override
    public int updateGyArmParamRecord(GyArmParamRecord gyArmParamRecord)
    {
        gyArmParamRecord.setUpdateTime(DateUtils.getNowDate());
        return gyArmParamRecordMapper.updateGyArmParamRecord(gyArmParamRecord);
    }

    /**
     * 批量删除机械臂配置
     *
     * @param recordIds 需要删除的机械臂配置主键
     * @return 结果
     */
    @Override
    public int deleteGyArmParamRecordByRecordIds(String recordIds)
    {
        return gyArmParamRecordMapper.deleteGyArmParamRecordByRecordIds(Convert.toStrArray(recordIds));
    }

    /**
     * 删除机械臂配置信息
     *
     * @param recordId 机械臂配置主键
     * @return 结果
     */
    @Override
    public int deleteGyArmParamRecordByRecordId(Long recordId)
    {
        return gyArmParamRecordMapper.deleteGyArmParamRecordByRecordId(recordId);
    }
}
